import types from './mutationsType'
const consumerMutations = {
  [types.SET_TEST]: (state, newVal) => {
    state.test = newVal
  },
  [types.SET_CON_HOMEPAGEDATA]: (state, res) => {
    const conHomePage = {
      hotSearch: res.data.data.tags,
      recommendDoctors: res.data.data.doctors.list ? res.data.data.doctors.list : [],
      department: res.data.data.depts
    }
    state.conHomePage = conHomePage
  }
}

export default consumerMutations